package com.brillilab.dao.mapper.experiments;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brillilab.domain.po.experiments.Experiment;
import com.brillilab.domain.po.kit.Kit;
import com.brillilab.domain.vo.experiments.ExperimentIconListVo;
import com.brillilab.domain.vo.topics.ExperimentDateListVo;
import com.brillilab.domain.vo.topics.TopicExperimentResultVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 实验 Mapper 接口
 * </p>
 * @since 2019-09-05
 */
public interface ExperimentMapper extends BaseMapper<Experiment> {

	int resultCount(Long topicExperimentTargetId);

	Experiment selectExperimentByStepId(Long stepId);

	List<TopicExperimentResultVo> getExperimentHistory(@Param("topicExperimentId")Long topicExperimentId);

	List<ExperimentDateListVo> getExperimentDateListVo(@Param("topicExperimentIds")List<Long> topicExperimentIds,
			@Param("targetGroupId") Long targetGroupId);

	List<ExperimentIconListVo> getExperimentIconVoList(@Param("experimentIds")List<Long> experimentIds);

	/**
	 * 获取实验试剂
	 * @param experimentId
	 * @return
	 */
	List<Kit> selectExperimentKitList(@Param("experimentId") Long experimentId);
	
	List<Long> selectIdByTopicIds(@Param("topicIds") List<Long> topicIds);

	List<Experiment> selectLastExperiment(Long experimentId);

	int getExperimentCountByExecutorId(@Param("executorId")Long executorId);

	int getExperimentCountByExecutorIdList(@Param("executorIdList")List<Long> executorIds);

	List<Experiment> getListByTopicIds(@Param("topicIds") List<Long> topicIds);


	List<Experiment> getGuideExperimentList(@Param("labId")Long labId, @Param("labMemberIdList")List<Long> labMemberIdList);

	List<Experiment> getPlanExperimentListByLabId(@Param("labId")Long labId,@Param("executorIds")List<Long> executorIds);

}
